package com.sinosoft.bee.services.cousumerwithfeign.config;

import com.github.pagehelper.PageHelper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Properties;

@Configuration
public class MybatisConfig {

    @Bean
    public PageHelper pageHelper(){
        PageHelper pageHelper = new PageHelper();
        Properties pros = new Properties();
        pros.setProperty("dialect","mysql");
        pros.setProperty("offsetAsPageNum","true");
        pros.setProperty("rowBoundsWithCount","true");
        pageHelper.setProperties(pros);
        return pageHelper;
    }
}
